package com.tepth.appmanageservice.protocol.bodys.ordinaryfile;

import com.tepth.appmanageservice.protocol.interfaces.ISend;
import com.tepth.appmanageservice.tools.ext.ExtToBytes;

public class OperationOrdinaryFileReply implements ISend {
	public static final short ID = 0x0C25;

	private short replySerialNumber; // Ӧ����ˮ��
	private byte isSupport; // �ն��Ƿ�֧�ִ˲���
	private byte[] data;

	public short getReplySerialNumber() {
		return this.replySerialNumber;
	}

	public void setReplySerialNumber(short replySerialNumber) {
		this.replySerialNumber = replySerialNumber;
	}

	public byte getIsSupport() {
		return this.isSupport;
	}

	public void setIsSupport(byte isSupport) {
		this.isSupport = isSupport;
	}

	@Override
	public short getId() {
		return ID;
	}

	@Override
	public short getLength() {
		return (short) this.data.length;
	}

	@Override
	public byte[] getResult() {
		return this.data;
	}

	@Override
	public void load() {
		byte[][] datas = new byte[2][];
		datas[0] = ExtToBytes.fromNumber(this.replySerialNumber);
		datas[1] = new byte[] { this.isSupport };

		this.data = ExtToBytes.fromByteArray2(datas);
	}
}